<template>
  <div class="main">
    <c-bill-buttom-bar>
      <span style="padding: 10px 10px;" />
      <el-button type="info" size="mini" round @click="getFocus">检验</el-button>
      <el-button type="info" size="mini" round>输血 (0)</el-button>
      <el-button type="info" size="mini" round>输血反应 (0)</el-button>
      <el-button type="info" size="mini" round>危急值 (0)</el-button>
    </c-bill-buttom-bar>

    <el-input ref="content" v-model="abc"></el-input>
    <el-select v-model="abc" placeholder="请选择">
      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
      </el-option>
    </el-select>

    <c-form title="患者信息" :model="ruleForm" :rules="rules">
      <fieldset :disabled=true>
        <el-row :gutter="10">
          <c-input label="标题" :disabled=true value="王小小" required />
          <c-input label="标题2" :required=true />
          <c-input label="标题3" @onFocus="getFocus" />
          <c-input label="标题4" />
          <c-input label="标题" />
          <c-input label="标题" />
          <c-input label="标题标题标题" />
        </el-row>
      </fieldset>
    </c-form>

    <el-collapse v-model="activeNames" @change="handleChange">
      <div>与现实生活一致：与现实生活的流程、逻辑保持一致，遵循用户习惯的语言和概念；</div>
      <div>在界面中一致：所有的元素和结构需保持一致，比如：设计样式、图标和文本、元素的位置等。</div>
      <el-collapse-item title="反馈 Feedback" name="2">
        <div>控制反馈：通过界面样式和交互动效让用户可以清晰的感知自己的操作；</div>
        <div>页面反馈：操作后，通过页面元素的变化清晰地展现当前状态。</div>
      </el-collapse-item>
      <el-collapse-item title="效率 Efficiency" name="3">
        <div>简化流程：设计简洁直观的操作流程；</div>
        <div>清晰明确：语言表达清晰且表意明确，让用户快速理解进而作出决策；</div>
        <div>帮助用户识别：界面简单直白，让用户快速识别而非回忆，减少用户记忆负担。</div>
      </el-collapse-item>
      <el-collapse-item title="可控 Controllability" name="4">
        <div>用户决策：根据场景可给予用户操作建议或安全提示，但不能代替用户进行决策；</div>
        <div>结果可控：用户可以自由的进行操作，包括撤销、回退和终止当前操作等。</div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
export default {
  name: "HelloWorld",
  components: {},
  props: {
    msg: String
  },
  methods: {
    getFocus() {
      this.$refs.content.focus();
    }
  },
  data() {
    return {
      input: "",
      isFocus: true,
      ruleForm: {
        name: "名称",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      rules: {
        name: [
          { required: true, message: "请输入活动名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
        ],
        region: [
          { required: true, message: "请选择活动区域", trigger: "change" }
        ],
        date1: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change"
          }
        ],
        date2: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change"
          }
        ],
        type: [
          {
            type: "array",
            required: true,
            message: "请至少选择一个活动性质",
            trigger: "change"
          }
        ],
        resource: [
          { required: true, message: "请选择活动资源", trigger: "change" }
        ],
        desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }]
      },
      options: [
        {
          value: "选项1",
          label: "黄金糕"
        },
        {
          value: "选项2",
          label: "双皮奶"
        },
        {
          value: "选项3",
          label: "蚵仔煎"
        },
        {
          value: "选项4",
          label: "龙须面"
        },
        {
          value: "选项5",
          label: "北京烤鸭"
        }
      ],
      abc: "",
      label: "",
      key: ""
    };
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.main {
  background: #f6f6f6;
  padding: 20px 20px;
}
</style>
